# Maintainer: Kyle Keen <keenerd@gmail.com>

pkgname=python-sane
pkgver=2.9.1
pkgrel=4
pkgdesc="Python interface to the SANE scanner and frame grabber."
arch=('loong64' 'x86_64')
url="https://python-sane.readthedocs.io/en/latest/"
license=('MIT')
depends=('sane' 'python')
makedepends=('python-setuptools')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/python-pillow/Sane/archive/v${pkgver}.tar.gz")
sha256sums=('a82c677e0e4caff89f1aaac4cbf2d1d4ee6cd9178b391c88857254a1e42991f8')

build() {
  cd "${srcdir}"/Sane-${pkgver}
  python setup.py build
}

package() {
  cd "${srcdir}"/Sane-${pkgver}
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
